package com.zry.controller;

import com.zry.entity.BlogCategory;
import com.zry.service.blogCategoty.IBlogCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author Zry
 */
@Controller
public class BlogCategoryController {

    @Autowired
    private IBlogCategoryService blogCategoryService;

    @GetMapping("/api/blogCategory/load")
    @ResponseBody
    public List<BlogCategory> findCategories(){
        return blogCategoryService.findBlogCategories();
    }

}
